try {
    tests = [
        'NO_OP',
        'IMPORT',
        'SYS_CALL',
        'BREAKPOINT',
        'PRINT',
        'PUSH_CLASS',
        'PUSH_FUNCTION',
        'PUSH_PROPERTY',
        'PUSH_VAR',
        'PUSH_CONST',
        'POP',
        'DUPLICATE',
        'SWAP',
        'PUSH_ITER',
        'POP_ITER',
        'NEXT_ITER',
        'ITERATE',
        'recursion',
        'string_ops'
        ];
    
    
    if (console == undefined) { //jsc doesn't have the console.log function
        var console = {"log":print,"error":print};
    }
    //if (XMLHttpRequest == undefined) {
        var XMLHttpRequest = function () {
                this.open = function (method,URI,async) {this.responseText = load(URI);};
                this.responseText = "";
                this.send = function () {};
        }
    //}

    console.log("Running tests...");
    for (var i = 0; i < tests.length; i++) {
        var test = tests[i]
        console.log("Running test " + test + "...");
        try {
            load("../../runtime/JavaScript/translate.js")
            load("../../runtime/JavaScript/vm.js");
            IMPORT(test);
            POP();
            _STACK_CHECK(1);
        } catch (e) {
            console.error("UNCAUGHT EXCEPTION: " + e + " - line " + e.line)
        }
        
    }
    console.log("...done");
} catch (e) {
    print("FATAL ERROR - " + e + " - line " + e.line);
}